#!/usr/bin/python3

import mysql.connector
conn = mysql.connector.connect(user='test', password='test', database='pytest')
cursor = conn.cursor()
new_employee = ('INSERT INTO employees '
    '(empid, lastname, firstname, salary) '
    'VALUES (%s, %s, %s, %s)')

employee1 = ('1', 'Blum', 'Barbara', '45000.00')
employee2 = ('2', 'Blum', 'Rich', '30000.00')

try:
    cursor.execute(new_employee, employee1)
    cursor.execute(new_employee, employee2)
    conn.commit()
except:
    print('Sorry, there was a problem adding the data')
else:
   print('Data values added!')
cursor.close()
conn.close()
